﻿using PRO.DbProvider;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace PRO.Public
{
    public class PublicLib
    {
        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="tablename">表名</param>
        /// <param name="keys">主键</param>
        /// <param name="sort">排序：id asc</param>
        /// <param name="pageindex">页码</param>
        /// <param name="pagesize">每页显示条数</param>
        /// <param name="fields">查询列名</param>
        /// <param name="filter">过滤</param>
        /// <param name="group">分组</param>
        /// <param name="TotalPage">输出总页数</param>
        /// <param name="counts">输出总条数</param>
        /// <returns></returns>
        public static DataTable CutPage(string tablename, string keys, string sort, int pageindex, int pagesize, string fields, string filter, string group, out int TotalPage, out int counts)
        {
            return DataBaseProvider.CreatePublic().CutPage(tablename, keys, sort, pageindex, pagesize, fields, filter, group, out TotalPage, out counts);
        }
    }
}
